#pragma once
#include "stdafx.h"
//#include "io/InputDevice.h"
//#include "scene/Camera.h"
//#include "scene/World.h"
#include "game/Figure.h"
#include "game/FigureManager.h"
#include "game/ModelManager.h"
//#include "game/Pickup.h"
#include "statemachine/stdafx.h"
#include "GameState.h"
	
	class LogicEngine : public BaseEntity,public Component
	{
	public:
		LogicEngine(int32 id);
		~LogicEngine(void);

		void addedToObject();
		void SetMousePoint(int32,int32);
		D3DXVECTOR2 GetMousePoint();
		void Update();
		void InitFight(Message const & msg);
		void ChangeGameState(GAME_STATE);
		void Esc(Message const & msg);
		void SetCamera(Message const & msg);
		void KeyQ(Message const & msg);
		void KeyW(Message const & msg);
		void KeyE(Message const & msg);
		void KeyA(Message const & msg);
		void KeyS(Message const & msg);
		void KeyD(Message const & msg);
		void MLClicked(Message const & msg);
		void MRClicked(Message const & msg);
		void ChangeFightState(FIGHT_STATE);
		FIGHT_STATE GetFightState();
		GAME_STATE GetGameState();

		StateMachine<LogicEngine>*  GetFSM()const{return m_pStateMachine;}
	private:

		bool m_bStory;
		bool m_bFight;
		D3DXVECTOR2 m_mousePoint;
		int32 m_screenWidth;
		int32 m_screenHeight;
		GAME_STATE	m_eGState;
		FIGHT_STATE m_eFState;
		StateMachine<LogicEngine>*  m_pStateMachine;
	};